package org.example.controller;

import org.example.bean.R;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/api/test")
@CrossOrigin(origins = "*")
public class TestController {
    
    @GetMapping("/hello")
    public R testHello() {
        return new R().setMsg("Hello World!").add("timestamp", System.currentTimeMillis());
    }
    
    @GetMapping("/ping")
    public String ping() {
        return "pong";
    }
} 